 //
//  libQPJHLightChannel.h
//  libQPJHLightChannel
//
//  Created by qply on 2020/9/8.
//  Copyright © 2020 qipa. All rights reserved.
//

#import <UIKit/UIKit.h>
@class QPJHChannelRoleInfo;
@class QPJHChannelOrderInfo;

@protocol QPJHLightChannelDelegate <NSObject>

@required

//聚合渠道:登录回调  result: token uid  channel_code
- (void)qpjhChannel_LightGetChannelLoginCallBack:(NSDictionary *)result;

//聚合渠道:上报角色回调
- (void)qpjhChannel_getUpdateRoleCallBack:(NSDictionary *)result;

//聚合渠道:支付成功回调
- (void)qpjhChannel_getPaySuccessCallBack:(NSDictionary *)result;

//聚合渠道:支付失败回调
- (void)qpjhChannel_getPayFailCallBack:(NSDictionary *)result;

//聚合渠道:支付取消回调
- (void)qpjhChannel_getPayCancelCallBack:(NSDictionary *)result;

//聚合渠道:注销, 切换账号回调
- (void)qpjhChannel_logOutCallBack:(NSString *)result;


@end

@interface libQPJHLightChannel : NSObject <UIApplicationDelegate>

@property (copy, nonatomic) NSString *platformId;
@property (copy, nonatomic) NSString *loginUrl;
@property (copy, nonatomic) NSString *orderUrl;

/**
 获取SDK实例
 */
+ (libQPJHLightChannel *)sharedInstance;

@property (nonatomic ,weak) id <QPJHLightChannelDelegate> delegate;

/**
 设置监听
 */
- (void)qpjhChannel_setStartLoginListener : (id)loginListener;

/**
 登录
 */
- (void)qpjhChannel_lightLoginStart;

/**
 提交角色信息(在 创建角色、 进入游戏、 升级角色 时都要调用该方法.)
 */
- (void)qpjhChannel_superRoleUpdate:(QPJHChannelRoleInfo *)roleInfo;

/**
 创建订单接口
 */
- (void)qpjhChannel_superOrder:(QPJHChannelOrderInfo *)orderInfo;


/**
 退出登录接口
 */
- (void)qpjhChannel_logout;
/**
 跳转小程序
 */
- (void)qpjhChannel_jump_miniPrograms;

/**
 账号删除接口
 */
- (void)qpjhChannel_logoutForAccountDelete;

/**
 在有网络后的一些初始化操作
 */
- (void)qpjhAfterNerwork_init;


@end
